import SvgIcon from './SvgIcon/index.vue'
import Category from './Category/index.vue'


//引入element-plus提供全部图标组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const allGloableComponent: any = { SvgIcon, Category }

export default {
    install(app: any) {
        Object.keys(allGloableComponent).forEach(key => {
            app.component(key, allGloableComponent[key])
        })
        //将element-plus提供全部图标注册为全局组件 
        for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
            app.component(key, component)
        }
    }
}